<?php
/**
 * Created by PhpStorm.
 * User: guokunsheng
 * Date: 2018/8/6
 * Time: 11:08
 */

namespace app\everyday\controller;

use think\Controller;

/**
 * 每日运势-忌
 * Class Avoid
 * @package app\everyday\controller
 */
class Avoid extends Controller
{
    // 行运数据
    public $transitsData = [];
    // 三限数据
    public $thirdprogressedData = [];
    // 天象数据
    public $nowData = [];
    // 本命数据
    public $natalData = [];

    protected $keywords = [];

    public function _initialize(){}

    public function init($index = false)
    {

        $this->keywords = [];

        $this->getKeywords();

        $result = $this->keywords;

        $result = resort($result,'per','DESC');

        $res = [];

        $count_gt_3 = 0;

        foreach ($result as $r)
        {
            $res[] = $r['text'];

            if($r['per'] >= 3)
            {
                $count_gt_3++;
            }
        }

        if($index === false)
        {
            if($count_gt_3 >= 1)
            {
                $res = array_slice($res,0,$count_gt_3);
            }
            else
            {
                $res = array_slice($res,0,2);
            }
        }
        else
        {
            if($count_gt_3 <= 1)
            {
                $res = array_slice($res,0,1);
            }
            else
            {
                $res = array_slice($res,0,2);
            }
        }

        return $res;
    }

    protected function getKeywords()
    {
        $this->getKeywordsByHouse1();
        $this->getKeywordsByHouse2();
        $this->getKeywordsByHouse3();
        $this->getKeywordsByHouse4();
        $this->getKeywordsByHouse5();
        $this->getKeywordsByHouse6();
        $this->getKeywordsByHouse7();
        $this->getKeywordsByHouse8();
        $this->getKeywordsByHouse9();
        $this->getKeywordsByHouse10();
        $this->getKeywordsByHouse11();
        $this->getKeywordsByHouse12();
    }

    protected function getKeywordsByHouse1()
    {
        $tr_planet = $this->transitsData[1]['planets'];// 行运外盘数据
        $tp_planet = $this->thirdprogressedData['planets'];// 三限数据

        $score_1_tr = $score_1_tp = 0;
        $score_2_tr = $score_2_tp = 0;
        $score_3_tr = $score_3_tp = 0;
        $score_4_tr = $score_4_tp = 0;
        $score_5_tr = $score_5_tp = 0;
        $score_6_tr = $score_6_tp = 0;
        $score_7_tr = $score_7_tp = 0;
        // 胡思乱想
        //	tr月亮刑冲合水星或海王+2，若此时水星与海王成相+2
        //	tp月亮8/12宫，刑冲合海王+1，若此时水星与海王成相+1
        //	流年海王刑冲合水星+0.3
        //	tr水星刑冲合海王+0.3
        if(checkPhase([1],[2],[0,90,180],$tr_planet))
        {
            $score_1_tr += 2;
            if(checkPhase([2],[8],[],$tr_planet))
            {
                $score_1_tr += 2;
            }
        }
        if(checkPhase([1],[8],[0,90,180],$tr_planet))
        {
            $score_1_tr += 2;
            if(checkPhase([2],[8],[],$tr_planet))
            {
                $score_1_tr += 2;
            }
        }
        if(checkSignHouse([1],[8,12],$tp_planet) && checkPhase([1],[8],[0,90,180],$tp_planet))
        {
            $score_1_tp += 1;
            if(checkPhase([2],[8],[],$tr_planet))
            {
                $score_1_tp += 1;
            }
        }
        if(checkPhase([8],[2],[0,90,180],$tr_planet))
        {
            $score_1_tr += 0.3;
        }
        if(checkPhase([2],[8],[0,90,180],$tr_planet))
        {
            $score_1_tr += 0.3;
        }
        // 回忆往事
        //	tr月亮12宫刑冲合水星+2，若此时水星与海王成相+2
        //	tp月亮12宫，刑冲合海王+1，若此时水星与海王成相+1
        //	流年海王刑冲月亮+0.3
        //	tr水星12宫刑冲海王+0.3
        if(checkSignHouse([1],[12],$tr_planet) && checkPhase([1],[2],[0,90,180],$tr_planet))
        {
            $score_2_tr += 2;
            if(checkPhase([2],[8],[],$tr_planet))
            {
                $score_2_tr += 2;
            }
        }
        if(checkSignHouse([1],[12],$tp_planet) && checkPhase([1],[8],[0,90,180],$tp_planet))
        {
            $score_2_tp += 1;
            if(checkPhase([2],[8],[],$tr_planet))
            {
                $score_2_tp += 1;
            }
        }
        if(checkPhase([8],[1],[90,180],$tr_planet))
        {
            $score_2_tr += 0.3;
        }
        if(checkSignHouse([2],[12],$tp_planet) && checkPhase([2],[8],[90,180],$tr_planet))
        {
            $score_2_tr += 0.3;
        }
        // 感伤
        //	tr月亮12宫与海王或冥王成相+2
        //	tp月亮12宫刑冲合海王+1
        if(checkSignHouse([1],[12],$tr_planet))
        {
            if(checkPhase([1],[8],[],$tr_planet))
            {
                $score_3_tr += 2;
            }
            if(checkPhase([1],[9],[],$tr_planet))
            {
                $score_3_tr += 2;
            }
        }
        if(checkSignHouse([1],[12],$tp_planet) && checkPhase([1],[8],[0,90,180],$tr_planet))
        {
            $score_3_tp += 1;
        }
        // 喧闹
        //	tr月亮5/11宫，刑冲火星+2
        //	tp月亮5/11宫，刑冲水星+1
        //	tr火星刑冲合日月水+0.5
        if(checkSignHouse([1],[5,12],$tr_planet) && checkPhase([1],[2],[90,180],$tr_planet))
        {
            $score_4_tr += 2;
        }
        if(checkSignHouse([1],[5,12],$tp_planet) && checkPhase([1],[2],[90,180],$tp_planet))
        {
            $score_4_tp += 1;
        }
        if(checkPhase([4],[0,1,2],[0,90,180],$tr_planet))
        {
            $score_4_tr += 0.5;
        }
        // 自我膨胀
        //	tp月亮或水星刑冲合木星+1，若此时太阳刑冲合木星+1
        //	tr木星刑冲合日月水+2
//        if(checkPhase([1],[5],[0,90,180],$tp_planet))
//        {
//            $score_5_tp += 1;
//            if(checkPhase([0],[5],[0,90,180],$tp_planet))
//            {
//                $score_5_tp += 1;
//            }
//        }
//        if(checkPhase([2],[5],[0,90,180],$tp_planet))
//        {
//            $score_5_tp += 1;
//            if(checkPhase([0],[5],[0,90,180],$tp_planet))
//            {
//                $score_5_tp += 1;
//            }
//        }
//        if(checkPhase([5],[0,1,2],[0,90,180],$tr_planet))
//        {
//            $score_5_tr += 2;
//        }
        //自我膨胀
        // tp月亮或水星刑冲合木星+0.5，若此时太阳刑冲木星+0.3
        // tr日水之一与木星刑冲合+1
        // tr木星刑冲本命日月水+0.5
        // tr月亮与木星刑冲合+2
        if(checkPhase([1,2],[5],[0,90,180],$tp_planet))
        {
            $score_5_tp += 0.5;
            if(checkPhase([0],[5],[90,180],$tp_planet))
            {
                $score_5_tp += 0.3;
            }
        }
        if(checkPhase([0,2],[5],[0,90,180],$tr_planet))
        {
            $score_5_tr += 1;
        }
        if(checkPhase([5],[0,1,2],[90,180],$tr_planet))
        {
            $score_5_tr += 0.5;
        }
        if(checkPhase([1],[5],[0,90,180],$tr_planet))
        {
            $score_5_tr += 2;
        }
        // 拖延
        //	tp月亮或火星或水星刑冲合土星+1，若此时太阳刑冲合土星+1
        //	tr土星刑冲合日月水火+2
        //拖延症 修改版 20180807
        //	tp月亮或火星或水星刑冲合土星+0.5，若此时太阳刑冲合海王+0.4
        //	tr土星刑冲合日月水火+0.3
        //	tr日月水之一刑冲本命土星+1（叠加）
        if(checkPhase([1],[6],[0,90,180],$tp_planet))
        {
            $score_6_tp += 0.5;
            if(checkPhase([0],[8],[0,90,180],$tp_planet))
            {
                $score_6_tp += 0.4;
            }
        }
        if(checkPhase([2],[6],[0,90,180],$tp_planet))
        {
            $score_6_tp += 0.5;
            if(checkPhase([0],[8],[0,90,180],$tp_planet))
            {
                $score_6_tp += 0.4;
            }
        }
        if(checkPhase([4],[6],[0,90,180],$tp_planet))
        {
            $score_6_tp += 0.5;
            if(checkPhase([0],[8],[0,90,180],$tp_planet))
            {
                $score_6_tp += 0.4;
            }
        }
        if(checkPhase([2],[0,1,2,4],[0,90,180],$tr_planet))
        {
            $score_6_tr+= 0.3;
        }
        if(checkPhase([0],[6],[90,180],$tr_planet))
        {
            $score_6_tr += 1;
        }
        if(checkPhase([1],[6],[90,180],$tr_planet))
        {
            $score_6_tr += 1;
        }
        if(checkPhase([2],[6],[90,180],$tr_planet))
        {
            $score_6_tr += 1;
        }
        // 冲动
        //	tp月亮或水星与火星刑冲合+1，若此时太阳刑冲合火星+1
        //	tr火星刑冲合日月水+2
        //生闷气 修改版 20180807
        //	tp月亮或水星与火星刑冲合+1，若此时太阳刑冲合火星+1
        //	tr火星刑冲合日月水+2
        if(checkPhase([1],[4],[0,90,180],$tp_planet))
        {
            $score_7_tp += 1;
            if(checkPhase([0],[4],[0,90,180],$tp_planet))
            {
                $score_7_tp += 1;
            }
        }
        if(checkPhase([2],[4],[0,90,180],$tp_planet))
        {
            $score_7_tp += 1;
            if(checkPhase([0],[4],[0,90,180],$tp_planet))
            {
                $score_7_tp += 1;
            }
        }
        if(checkPhase([4],[0,1,2],[0,90,180],$tr_planet))
        {
            $score_7_tr += 1;
        }

        $score_1 = $score_1_tr + $score_1_tp;
        if($score_1_tr && $score_1_tp) $score_1 += 2;
        $score_2 = $score_2_tr + $score_2_tp;
        if($score_2_tr && $score_2_tp) $score_2 += 2;
        $score_3 = $score_3_tr + $score_3_tp;
        if($score_3_tr && $score_3_tp) $score_3 += 2;
        $score_4 = $score_4_tr + $score_4_tp;
        if($score_4_tr && $score_4_tp) $score_4 += 2;
        $score_5 = $score_5_tr + $score_5_tp;
        if($score_5_tr && $score_5_tp) $score_5 += 2;
        $score_6 = $score_6_tr + $score_6_tp;
        if($score_6_tr && $score_6_tp) $score_6 += 2;
        $score_7 = $score_7_tr + $score_7_tp;
        if($score_7_tr && $score_7_tp) $score_7 += 2;

        if($score_1 > 0) $this->keywords[] = [
            'text' => '胡思乱想',
            'per' => $score_1,
        ];
        if($score_2 > 0) $this->keywords[] = [
            'text' => '回忆往事',
            'per' => $score_2,
        ];
        if($score_3 > 0) $this->keywords[] = [
            'text' => '感伤',
            'per' => $score_3,
        ];
        if($score_4 > 0) $this->keywords[] = [
            'text' => '喧闹',
            'per' => $score_4,
        ];
        if($score_5 > 0) $this->keywords[] = [
            'text' => '自我膨胀',
            'per' => $score_5,
        ];
        if($score_6 > 0) $this->keywords[] = [
            'text' => '拖延症',
            'per' => $score_6,
        ];
        if($score_7 > 0) $this->keywords[] = [
            'text' => '生闷气',
            'per' => $score_7,
        ];
    }
    protected function getKeywordsByHouse2()
    {
        $tr_planet = $this->transitsData[1]['planets'];// 行运外盘数据
        $tp_planet = $this->thirdprogressedData['planets'];// 三限数据
        $na_planet = $this->natalData['planets'];

        $score_1_tr = $score_1_tp = 0;
//        $score_2_tr = $score_2_tp = 0;
        $score_3_tr = $score_3_tp = 0;
        $score_4_tr = $score_4_tp = 0;
        // 刷爆信用卡
        //	tr月亮2宫或8宫刑冲火星+2，若此时tr火星与木星刑冲+2
        //	tp月亮2宫或8宫刑冲火星+0.5，若此时tp火星与木星刑冲+0.5
        //	流年木星刑冲金星+0.3
        //	tr金星2宫或8宫刑冲海王（或火木）+0.3
        //	本命火（木）星在2宫或8宫，tr月亮刑冲+1，合+2
        if(checkSignHouse([1],[2,8],$tr_planet) && checkPhase([1],[4],[90,180],$tr_planet))
        {
            $score_1_tr += 2;
            if(checkPhase([4],[5],[90,180],$tr_planet))
            {
                $score_1_tr += 2;
            }
        }
        if(checkSignHouse([1],[2,8],$tp_planet) && checkPhase([1],[4],[90,180],$tp_planet))
        {
            $score_1_tp += 0.5;
            if(checkPhase([4],[5],[90,180],$tp_planet))
            {
                $score_1_tp += 0.5;
            }
        }
        if(checkPhase([5],[3],[90,180],$tr_planet))
        {
            $score_1_tr += 0.3;
        }
        if(checkSignHouse([3],[2,8],$tr_planet) && checkPhase([3],[4,5,8],[90,180],$tr_planet))
        {
            $score_1_tr += 0.3;
        }
        if(checkSignHouse([4],[2,8],$na_planet))
        {
            if(checkPhase([1],[4],[90,180],$tr_planet))
            {
                $score_1_tr += 1;
            }
            elseif(checkPhase([1],[4],[0],$tr_planet))
            {
                $score_1_tr += 2;
            }
        }
        if(checkSignHouse([5],[2,8],$na_planet))
        {
            if(checkPhase([1],[5],[90,180],$tr_planet))
            {
                $score_1_tr += 1;
            }
            elseif(checkPhase([1],[5],[0],$tr_planet))
            {
                $score_1_tr += 2;
            }
        }

        // 乱吃药
        //	tr月亮2宫或6宫刑冲海王+2，若此时tr火星与海王刑冲+2
        //	tp月亮2宫或6宫刑冲海王+0.5，若此时火星与海王刑冲+0.5
        //	流海刑冲月亮+0.3【1度内】
        //	(tr/tp)强化：土、火与海王成相+0.5
        //	tr水星（或金火日）2宫或6宫刑冲海王+0.4
        //	本命海王在2宫，tr月亮刑冲+2，合+3
//        if(checkSignHouse([1],[2,6],$tr_planet) && checkPhase([1],[8],[90,180],$tr_planet))
//        {
//            $score_2_tr += 2;
//            if(checkPhase([4],[8],[90,180],$tr_planet))
//            {
//                $score_2_tr += 2;
//            }
//        }
//        if(checkSignHouse([1],[2,6],$tp_planet) && checkPhase([1],[8],[90,180],$tp_planet))
//        {
//            $score_2_tr += 0.5;
//            if(checkPhase([4],[8],[90,180],$tp_planet))
//            {
//                $score_2_tr += 0.5;
//            }
//        }
//        if(checkPhase([8],[1],[90,180],$tr_planet,1))
//        {
//            $score_2_tp += 0.3;
//        }
//        if(checkPhase([4,6],[8],[],$tr_planet))
//        {
//            $score_2_tr += 0.5;
//        }
//        if(checkPhase([4,6],[8],[],$tp_planet))
//        {
//            $score_2_tp += 0.5;
//        }
//        if(checkSignHouse([2],[2,6],$tr_planet) && checkPhase([2],[8],[90,180],$tr_planet))
//        {
//            $score_2_tr += 0.4;
//        }
//        if(checkSignHouse([0],[2,6],$tr_planet) && checkPhase([0],[8],[90,180],$tr_planet))
//        {
//            $score_2_tr += 0.4;
//        }
//        if(checkSignHouse([3],[2,6],$tr_planet) && checkPhase([3],[8],[90,180],$tr_planet))
//        {
//            $score_2_tr += 0.4;
//        }
//        if(checkSignHouse([4],[2,6],$tr_planet) && checkPhase([4],[8],[90,180],$tr_planet))
//        {
//            $score_2_tr += 0.4;
//        }
//        if(checkSignHouse([8],[2],$na_planet))
//        {
//            if(checkPhase([1],[8],[90,180],$tr_planet))
//            {
//                $score_2_tr += 2;
//            }
//            elseif(checkPhase([1],[8],[0],$tr_planet))
//            {
//                $score_2_tr += 3;
//            }
//        }

        // 暴饮暴食
        //	tr月亮2宫或6宫刑冲木星+2，若此时tr天王（或火星）与木星刑冲+2
        //	tp月亮2宫或6宫刑冲木星+0.5，若此时tp天王（或火星）与木星刑冲+0.5
        //	流年木星刑冲月亮+0.3
        //	本命火（木）星在2宫或6宫，tr月亮刑冲+1，合+2，若此时火（木）星与天王刑冲+0.3
        if(checkSignHouse([1],[2,6],$tr_planet) && checkPhase([1],[5],[90,180],$tr_planet))
        {
            $score_3_tr += 3;
            if(checkPhase([7],[5],[90,180],$tr_planet))
            {
                $score_3_tr += 2;
            }
            if(checkPhase([4],[5],[90,180],$tr_planet))
            {
                $score_3_tr += 2;
            }
        }
        if(checkSignHouse([1],[2,6],$tp_planet) && checkPhase([1],[5],[90,180],$tp_planet))
        {
            $score_3_tp += 0.5;
            if(checkPhase([7],[5],[90,180],$tp_planet))
            {
                $score_3_tp += 0.5;
            }
            if(checkPhase([4],[5],[90,180],$tp_planet))
            {
                $score_3_tp += 0.5;
            }
        }
        if(checkPhase([5],[1],[90,180],$tr_planet))
        {
            $score_3_tr += 0.3;
        }
        if(checkSignHouse([4],[2,6],$na_planet))
        {
            if(checkPhase([1],[4],[90,180],$tr_planet))
            {
                $score_3_tr += 1;
                if(checkPhase([4],[7],[90,180],$tr_planet))
                {
                    $score_3_tr += 0.3;
                }
            }
            elseif(checkPhase([1],[4],[0],$tr_planet))
            {
                $score_3_tr += 2;
                if(checkPhase([4],[7],[90,180],$tr_planet))
                {
                    $score_3_tr += 0.3;
                }
            }
        }
        if(checkSignHouse([5],[2,6],$na_planet))
        {
            if(checkPhase([1],[5],[90,180],$tr_planet))
            {
                $score_3_tr += 1;
                if(checkPhase([5],[7],[90,180],$tr_planet))
                {
                    $score_3_tr += 0.3;
                }
            }
            elseif(checkPhase([1],[5],[0],$tr_planet))
            {
                $score_3_tr += 2;
                if(checkPhase([5],[7],[90,180],$tr_planet))
                {
                    $score_3_tr += 0.3;
                }
            }
        }

        // 丢三落四
        //	tp月亮或水星刑冲合海王+1
        //	tr海王与日月水刑冲合+2
        //丢三落四 修改版
        //	tp月亮或水星刑冲合海王+1
        //		tp月亮在2/8宫+1
        //	tr海王与日月水刑冲合
        //		tr月亮在2宫+1
        //	tr水星刑冲海王且月亮在2宫或水星/海王之一在2宫+1
        if(checkPhase([1],[8],[0,90,180],$tp_planet))
        {
            $score_4_tp += 1;
            if(checkSignHouse([1],[2,8],$tp_planet))
            {
                $score_4_tp += 1;
            }
        }
        if(checkPhase([2],[8],[0,90,180],$tp_planet))
        {
            $score_4_tp += 1;
            if(checkSignHouse([1],[2,8],$tp_planet))
            {
                $score_4_tp += 1;
            }
        }
        if(checkPhase([8],[0,1,2],[0,90,180],$tr_planet))
        {
            if(checkSignHouse([1],[2],$tp_planet))
            {
                $score_4_tr += 2;
            }
        }
        if(checkPhase([2],[8],[90,180],$tr_planet))
        {
            if(checkSignHouse([1],[2],$tr_planet))
            {
                $score_4_tr += 1;
            }
            if(checkSignHouse([2,8],[2],$tr_planet))
            {
                $score_4_tr += 1;
            }
        }

        $score_1 = $score_1_tr + $score_1_tp;
        if($score_1_tr && $score_1_tp) $score_1 += 2;
//        $score_2 = $score_2_tr + $score_2_tp;
//        if($score_2_tr && $score_2_tp) $score_2 += 2;
        $score_3 = $score_3_tr + $score_3_tp;
        if($score_3_tr && $score_3_tp) $score_3 += 2;
        $score_4 = $score_4_tr + $score_4_tp;
        if($score_4_tr && $score_4_tp) $score_4 += 2;

        if($score_1 > 0) $this->keywords[] = [
            'text' => '刷爆信用卡',
            'per' => $score_1,
        ];
//        if($score_2 > 0) $this->keywords[] = [
//            'text' => '乱吃药',
//            'per' => $score_2,
//        ];
        if($score_3 > 0) $this->keywords[] = [
            'text' => '暴饮暴食',
            'per' => $score_3,
        ];
        if($score_4 > 0) $this->keywords[] = [
            'text' => '丢三落四',
            'per' => $score_4,
        ];
    }
    protected function getKeywordsByHouse3()
    {
        $tr_planet = $this->transitsData[1]['planets'];// 行运外盘数据
        $tp_planet = $this->thirdprogressedData['planets'];// 三限数据

        $score_1_tr = $score_1_tp = 0;
        $score_2_tr = $score_2_tp = 0;
//        // 乱说话
//        //	tp月亮或水星刑冲合海王+1，若此时水星与天王/火星刑冲合+1
//        //	tr海王星刑冲合日月水+2
//        if(checkPhase([1,2],[8],[0,90,180],$tp_planet))
//        {
//            $score_1_tp += 1;
//            if(checkPhase([2],[7,4],[0,90,180],$tp_planet))
//            {
//                $score_1_tp += 1;
//            }
//        }
//        if(checkPhase([8],[0,1,2],[0,90,180],$tr_planet))
//        {
//            $score_1_tr += 2;
//        }
        //乱说话
        // tp月亮与水星刑冲合，或tp水星与火星、海王之一刑冲合
        //  tr月水成相+2
        //  tr水海成相+1
        //  tr水火成相+1
        //  tr日水成相+1.5
        if(checkPhase([1],[2],[0,90,180],$tp_planet)
            || checkPhase([2],[4,8],[0,90,180],$tp_planet))
        {
            if(checkPhase([1],[2],[],$tr_planet))
            {
                $score_1_tr += 2;
            }
            if(checkPhase([2],[8],[],$tr_planet))
            {
                $score_1_tr += 1;
            }
            if(checkPhase([2],[4],[],$tr_planet))
            {
                $score_1_tr += 1;
            }
            if(checkPhase([0],[2],[],$tr_planet))
            {
                $score_1_tr += 1.5;
            }
        }

        // 出远门
        //	tp月亮过3/9宫，刑冲合火星或水星+1，若此时水星与天王或冥王刑冲合+1
        //	tr月亮过3/9宫，刑冲合火星或天王星+2，若此时水星与火星或天王星刑冲合+2
        //	tr火星3/9宫，刑冲日月水天+2
        if(checkSignHouse([1],[3,9],$tp_planet) && checkPhase([1],[2,4],[0,90,180],$tp_planet))
        {
            $score_2_tp += 1;
            if(checkPhase([2],[7,9],[0,90,180],$tp_planet))
            {
                $score_2_tp += 1;
            }
        }
        if(checkSignHouse([1],[3,9],$tr_planet) && checkPhase([1],[4,7],[0,90,180],$tr_planet))
        {
            $score_2_tr += 1;
            if(checkPhase([2],[4,7],[0,90,180],$tr_planet))
            {
                $score_2_tr += 2;
            }
        }
        if(checkSignHouse([4],[3,9],$tr_planet) && checkPhase([4],[0,1,2,7],[90,180],$tr_planet))
        {
            $score_2_tr += 2;
        }

        $score_1 = $score_1_tr + $score_1_tp;
        if($score_1_tr && $score_1_tp) $score_1 += 2;
        $score_2 = $score_2_tr + $score_2_tp;
        if($score_2_tr && $score_2_tp) $score_2 += 2;

        if($score_1 > 0) $this->keywords[] = [
            'text' => '乱说话',
            'per' => $score_1,
        ];
        if($score_2 > 0) $this->keywords[] = [
            'text' => '出远门',
            'per' => $score_2,
        ];
    }
    protected function getKeywordsByHouse4()
    {
        $tr_planet = $this->transitsData[1]['planets'];// 行运外盘数据
        $tp_planet = $this->thirdprogressedData['planets'];// 三限数据
        $na_planet = $this->natalData['planets'];// 本命数据

        $score_1_tr = $score_1_tp = 0;
        $score_2_tr = $score_2_tp = 0;
        // 与父母争吵
        //	tr月亮4宫刑冲火星，且火星刑冲天王星（或冥王星）+2
        //	tr月亮4宫刑冲天王星（或冥王星），且天王星（或冥王星）刑冲火星+2
        //  tp月亮4宫刑冲火星，且火星刑冲天王星（或冥王星）+1
        //	tp月亮4宫刑冲天王星（或冥王星），且天王星（或冥王星）刑冲火星+1
        //	本命火星（或冥王星）在4宫，tr月亮刑冲+0.5，合+1，若此时火星（或冥王星）刑冲天王星+1
        //	tr火星（或冥王星）在4宫，刑冲月亮+1，若此时天王星（或土星）刑冲火星（或冥王星）+1
        //	tp火星（或冥王星）在4宫，刑冲月亮+0.5
        if(checkSignHouse([1],[4],$tr_planet))
        {
            if(checkPhase([1],[4],[90,180],$tr_planet))
            {
                if(checkPhase([4],[7],[90,180],$tr_planet))
                {
                    $score_1_tr += 2;
                }
                if(checkPhase([4],[9],[90,180],$tr_planet))
                {
                    $score_1_tr += 2;
                }
            }
            if(checkPhase([1],[7],[90,180],$tr_planet) && checkPhase([7],[4],[90,180],$tr_planet))
            {
                $score_1_tr += 2;
            }
            if(checkPhase([1],[9],[90,180],$tr_planet) && checkPhase([9],[4],[90,180],$tr_planet))
            {
                $score_1_tr += 2;
            }
        }
        if(checkSignHouse([1],[4],$tp_planet))
        {
            if(checkPhase([1],[4],[90,180],$tp_planet))
            {
                if(checkPhase([4],[7],[90,180],$tp_planet))
                {
                    $score_1_tp += 1;
                }
                if(checkPhase([4],[9],[90,180],$tp_planet))
                {
                    $score_1_tp += 1;
                }
            }
            if(checkPhase([1],[7],[90,180],$tp_planet) && checkPhase([7],[4],[90,180],$tp_planet))
            {
                $score_1_tp += 1;
            }
            if(checkPhase([1],[9],[90,180],$tp_planet) && checkPhase([9],[4],[90,180],$tp_planet))
            {
                $score_1_tp += 1;
            }
        }
        if(checkSignHouse([4],[4],$na_planet))
        {
            if(checkPhase([1],[4],[90,180],$tr_planet))
            {
                $score_1_tr += 0.5;
                if(checkPhase([4],[7],[90,180],$tr_planet))
                {
                    $score_1_tr += 1;
                }
                if(checkPhase([9],[7],[90,180],$tr_planet))
                {
                    $score_1_tr += 1;
                }
            }
            elseif(checkPhase([1],[9],[0],$tr_planet))
            {
                $score_1_tr += 1;
                if(checkPhase([4],[7],[90,180],$tr_planet))
                {
                    $score_1_tr += 1;
                }
                if(checkPhase([9],[7],[90,180],$tr_planet))
                {
                    $score_1_tr += 1;
                }
            }
        }
        // tr火星（或冥王星）在4宫，刑冲月亮+1，若此时天王星（或土星）刑冲火星（或冥王星）+1
        //	tp火星（或冥王星）在4宫，刑冲月亮+0.5
        if(checkSignHouse([4],[4],$tr_planet) && checkPhase([4],[1],[90,180],$tr_planet))
        {
            $score_1_tr += 1;
            if(checkPhase([7,6],[4,9],[90,180],$tr_planet))
            {
                $score_1_tr += 1;
            }
        }
        if(checkSignHouse([9],[4],$tr_planet) && checkPhase([9],[1],[90,180],$tr_planet))
        {
            $score_1_tr += 1;
            if(checkPhase([7,6],[4,9],[90,180],$tr_planet))
            {
                $score_1_tr += 1;
            }
        }
        if(checkSignHouse([4],[4],$tp_planet) && checkPhase([4],[1],[90,180],$tp_planet))
        {
            $score_1_tp += 0.5;
        }
        if(checkSignHouse([9],[4],$tp_planet) && checkPhase([9],[1],[90,180],$tp_planet))
        {
            $score_1_tp += 0.5;
        }

        // 搬家
        //	tp月亮过4宫，刑冲合火星天王土星或冥王+1，若此时水星刑冲合土星+1
        //	tr月亮过4宫，刑冲合火星天王土星或冥王+2
        //	tr火星天王冥王土星之一在4宫，刑冲合月水+1
        if(checkSignHouse([1],[4],$tp_planet) && checkPhase([1],[4,6,7,9],[0,90,180],$tp_planet))
        {
            $score_2_tp += 1;
            if(checkPhase([2],[6],[0,90,180]))
            {
                $score_2_tp += 1;
            }
        }
        if(checkSignHouse([1],[4],$tr_planet) && checkPhase([1],[4,6,7,9],[0,90,180],$tr_planet))
        {
            $score_2_tr += 2;
        }
        if(
            (checkSignHouse([4],[4],$tr_planet) && checkPhase([4],[1,2],[0,90,180],$tr_planet))
            || (checkSignHouse([6],[4],$tr_planet) && checkPhase([6],[1,2],[0,90,180],$tr_planet))
            || (checkSignHouse([7],[4],$tr_planet) && checkPhase([7],[1,2],[0,90,180],$tr_planet))
            || (checkSignHouse([9],[4],$tr_planet) && checkPhase([9],[1,2],[0,90,180],$tr_planet))
        )
        {
            $score_2_tr += 1;
        }

        $score_1 = $score_1_tr + $score_1_tp;
        if($score_1_tr && $score_1_tp) $score_1 += 2;
        $score_2 = $score_2_tr + $score_2_tp;
        if($score_2_tr && $score_2_tp) $score_2 += 2;

        if($score_1 > 0) $this->keywords[] = [
            'text' => '与父母争吵',
            'per' => $score_1,
        ];
        if($score_2 > 0) $this->keywords[] = [
            'text' => '搬家',
            'per' => $score_2,
        ];
    }
    protected function getKeywordsByHouse5()
    {
        $tr_planet = $this->transitsData[1]['planets'];// 行运外盘数据
        $tp_planet = $this->thirdprogressedData['planets'];// 三限数据
        $na_planet = $this->natalData['planets'];// 本命数据

        $score_1_tr = $score_1_tp = 0;
        $score_2_tr = $score_2_tp = 0;
        $score_3_tr = $score_3_tp = 0;
        $score_4_tr = $score_4_tp = 0;
        // 轻易动情
        //	tr月亮5宫刑冲火星，且火星刑冲海王星（或金星）+2
        //	tp月亮5宫刑冲火星，且火星刑冲海王星（或金星）+1
        //	tr月亮5宫刑冲合海王星+1.2，若此时金星刑冲合海王星或天王星或土星+1.2
        //	tp月亮5宫刑冲合海王星+0.8，若此时金星刑冲合海王星或天王星或土星+0.8
        //	本命海王星（或天王星）在5宫，tr月亮（或金星、火星）刑冲+0.5，合+1
        //	本命金星（或火星）在5宫，tr月亮（或天王星、海王星）刑冲+0.5，合+1
        //	tr海王星（或天王星）在5宫，刑冲月亮（或金星、火星）刑冲+1，合+2
        //	tp海王星（或天王星）在5宫，刑冲月亮（或金星、火星）刑冲+0.5，合+1
        //	tr金星（或火星）在5宫，刑冲月亮（或天王星、海王星）+1，合+2
        //	tp金星（或火星）在5宫，刑冲月亮（或天王星、海王星）+0.5，合+1
//        if(checkSignHouse([1],[5],$tr_planet))
//        {
//            if(checkPhase([1],[4],[90,180],$tr_planet))
//            {
//                if(checkPhase([4],[3],[90,180],$tr_planet))
//                {
//                    $score_1_tr += 2;
//                }
//                if(checkPhase([4],[8],[90,180],$tr_planet))
//                {
//                    $score_1_tr += 2;
//                }
//            }
//            if(checkPhase([1],[8],[0,90,180],$tr_planet))
//            {
//                $score_1_tr += 1.2;
//                if(checkPhase([3],[6,7,8],[0,90,180],$tr_planet))
//                {
//                    $score_1_tr += 1.2;
//                }
//            }
//        }
//        if(checkSignHouse([1],[5],$tp_planet))
//        {
//            if(checkPhase([1],[4],[90,180],$tp_planet))
//            {
//                if(checkPhase([4],[3],[90,180],$tp_planet))
//                {
//                    $score_1_tp += 1;
//                }
//                if(checkPhase([4],[8],[90,180],$tp_planet))
//                {
//                    $score_1_tp += 1;
//                }
//            }
//            if(checkPhase([1],[8],[0,90,180],$tp_planet))
//            {
//                $score_1_tp += 0.8;
//                if(checkPhase([3],[6,7,8],[0,90,180],$tp_planet))
//                {
//                    $score_1_tp += 0.8;
//                }
//            }
//        }
//        if(checkSignHouse([8],[5],$na_planet))
//        {
//            if(checkPhase([1],[8],[90,180],$tr_planet))
//            {
//                $score_1_tr += 0.5;
//            }
//            elseif(checkPhase([1],[8],[0],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            if(checkPhase([3],[8],[90,180],$tr_planet))
//            {
//                $score_1_tr += 0.5;
//            }
//            elseif(checkPhase([3],[8],[0],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            if(checkPhase([4],[8],[90,180],$tr_planet))
//            {
//                $score_1_tr += 0.5;
//            }
//            elseif(checkPhase([4],[8],[0],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//        }
//        if(checkSignHouse([7],[5],$na_planet))
//        {
//            if(checkPhase([1],[7],[90,180],$tr_planet))
//            {
//                $score_1_tr += 0.5;
//            }
//            elseif(checkPhase([1],[7],[0],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            if(checkPhase([3],[7],[90,180],$tr_planet))
//            {
//                $score_1_tr += 0.5;
//            }
//            elseif(checkPhase([3],[7],[0],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            if(checkPhase([4],[7],[90,180],$tr_planet))
//            {
//                $score_1_tr += 0.5;
//            }
//            elseif(checkPhase([4],[7],[0],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//        }
//        if(checkSignHouse([3],[5],$na_planet))
//        {
//            if(checkPhase([1],[3],[90,180],$tr_planet))
//            {
//                $score_1_tr += 0.5;
//            }
//            elseif(checkPhase([1],[3],[0],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            if(checkPhase([7],[3],[90,180],$tr_planet))
//            {
//                $score_1_tr += 0.5;
//            }
//            elseif(checkPhase([7],[3],[0],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            if(checkPhase([8],[3],[90,180],$tr_planet))
//            {
//                $score_1_tr += 0.5;
//            }
//            elseif(checkPhase([8],[3],[0],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//        }
//        if(checkSignHouse([4],[5],$na_planet))
//        {
//            if(checkPhase([1],[4],[90,180],$tr_planet))
//            {
//                $score_1_tr += 0.5;
//            }
//            elseif(checkPhase([1],[4],[0],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            if(checkPhase([7],[4],[90,180],$tr_planet))
//            {
//                $score_1_tr += 0.5;
//            }
//            elseif(checkPhase([7],[4],[0],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            if(checkPhase([8],[4],[90,180],$tr_planet))
//            {
//                $score_1_tr += 0.5;
//            }
//            elseif(checkPhase([8],[4],[0],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//        }
//        if(checkSignHouse([8],[5],$tr_planet))
//        {
//            if(checkPhase([8],[1],[90,180],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            elseif(checkPhase([8],[1],[0],$tr_planet))
//            {
//                $score_1_tr += 2;
//            }
//            if(checkPhase([8],[3],[90,180],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            elseif(checkPhase([8],[3],[0],$tr_planet))
//            {
//                $score_1_tr += 2;
//            }
//            if(checkPhase([8],[4],[90,180],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            elseif(checkPhase([8],[4],[0],$tr_planet))
//            {
//                $score_1_tr += 2;
//            }
//        }
//        if(checkSignHouse([7],[5],$tr_planet))
//        {
//            if(checkPhase([7],[1],[90,180],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            elseif(checkPhase([7],[1],[0],$tr_planet))
//            {
//                $score_1_tr += 2;
//            }
//            if(checkPhase([7],[3],[90,180],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            elseif(checkPhase([7],[3],[0],$tr_planet))
//            {
//                $score_1_tr += 2;
//            }
//            if(checkPhase([7],[4],[90,180],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            elseif(checkPhase([7],[4],[0],$tr_planet))
//            {
//                $score_1_tr += 2;
//            }
//        }
//        if(checkSignHouse([8],[5],$tp_planet))
//        {
//            if(checkPhase([8],[1],[90,180],$tp_planet))
//            {
//                $score_1_tp += 0.5;
//            }
//            elseif(checkPhase([8],[1],[0],$tp_planet))
//            {
//                $score_1_tp += 1;
//            }
//            if(checkPhase([8],[3],[90,180],$tp_planet))
//            {
//                $score_1_tp += 0.5;
//            }
//            elseif(checkPhase([8],[3],[0],$tp_planet))
//            {
//                $score_1_tp += 1;
//            }
//            if(checkPhase([8],[4],[90,180],$tp_planet))
//            {
//                $score_1_tp += 0.5;
//            }
//            elseif(checkPhase([8],[4],[0],$tp_planet))
//            {
//                $score_1_tp += 1;
//            }
//        }
//        if(checkSignHouse([7],[5],$tp_planet))
//        {
//            if(checkPhase([7],[1],[90,180],$tp_planet))
//            {
//                $score_1_tp += 0.5;
//            }
//            elseif(checkPhase([7],[1],[0],$tp_planet))
//            {
//                $score_1_tp += 1;
//            }
//            if(checkPhase([7],[3],[90,180],$tp_planet))
//            {
//                $score_1_tp += 0.5;
//            }
//            elseif(checkPhase([7],[3],[0],$tp_planet))
//            {
//                $score_1_tp += 1;
//            }
//            if(checkPhase([7],[4],[90,180],$tp_planet))
//            {
//                $score_1_tp += 0.5;
//            }
//            elseif(checkPhase([7],[4],[0],$tp_planet))
//            {
//                $score_1_tp += 1;
//            }
//        }
//        if(checkSignHouse([3],[5],$tr_planet))
//        {
//            if(checkPhase([3],[1],[90,180],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            elseif(checkPhase([3],[1],[0],$tr_planet))
//            {
//                $score_1_tr += 2;
//            }
//            if(checkPhase([3],[7],[90,180],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            elseif(checkPhase([3],[7],[0],$tr_planet))
//            {
//                $score_1_tr += 2;
//            }
//            if(checkPhase([3],[8],[90,180],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            elseif(checkPhase([3],[8],[0],$tr_planet))
//            {
//                $score_1_tr += 2;
//            }
//        }
//        if(checkSignHouse([4],[5],$tr_planet))
//        {
//            if(checkPhase([4],[1],[90,180],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            elseif(checkPhase([4],[1],[0],$tr_planet))
//            {
//                $score_1_tr += 2;
//            }
//            if(checkPhase([4],[7],[90,180],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            elseif(checkPhase([4],[7],[0],$tr_planet))
//            {
//                $score_1_tr += 2;
//            }
//            if(checkPhase([4],[8],[90,180],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            elseif(checkPhase([4],[8],[0],$tr_planet))
//            {
//                $score_1_tr += 2;
//            }
//        }
//        if(checkSignHouse([3],[5],$tp_planet))
//        {
//            if(checkPhase([3],[1],[90,180],$tp_planet))
//            {
//                $score_1_tp += 0.5;
//            }
//            elseif(checkPhase([3],[1],[0],$tp_planet))
//            {
//                $score_1_tp += 1;
//            }
//            if(checkPhase([3],[7],[90,180],$tp_planet))
//            {
//                $score_1_tp += 0.5;
//            }
//            elseif(checkPhase([3],[7],[0],$tp_planet))
//            {
//                $score_1_tp += 1;
//            }
//            if(checkPhase([3],[8],[90,180],$tp_planet))
//            {
//                $score_1_tp += 0.5;
//            }
//            elseif(checkPhase([3],[8],[0],$tp_planet))
//            {
//                $score_1_tp += 1;
//            }
//        }
//        if(checkSignHouse([4],[5],$tp_planet))
//        {
//            if(checkPhase([4],[1],[90,180],$tp_planet))
//            {
//                $score_1_tp += 0.5;
//            }
//            elseif(checkPhase([4],[1],[0],$tp_planet))
//            {
//                $score_1_tp += 1;
//            }
//            if(checkPhase([4],[7],[90,180],$tp_planet))
//            {
//                $score_1_tp += 0.5;
//            }
//            elseif(checkPhase([4],[7],[0],$tp_planet))
//            {
//                $score_1_tp += 1;
//            }
//            if(checkPhase([4],[8],[90,180],$tp_planet))
//            {
//                $score_1_tp += 0.5;
//            }
//            elseif(checkPhase([4],[8],[0],$tp_planet))
//            {
//                $score_1_tp += 1;
//            }
//        }

        //轻易动情
        // tp金星或火星与海王刑冲合，或tp日海刑冲合，或tp月海刑冲合
        //  tp月亮过5/7宫与金火之一刑冲合+0.5
        //  tp月亮过5/7宫与海王成相+0.5
        //  tr金海成相+2
        //  tr火海成相+1
        //  tr金火或金日，金月，金金成相+1
        if(checkPhase([0,1,3,4],[8],[0,90,180],$tp_planet))
        {
            if(checkSignHouse([1],[5,7],$tp_planet))
            {
                if(checkPhase([1],[3,4],[0,90,180],$tp_planet))
                {
                    $score_1_tp += 0.5;
                }
                if(checkPhase([1],[8],[],$tp_planet))
                {
                    $score_1_tp += 0.5;
                }
            }
            if(checkPhase([3],[8],[],$tr_planet))
            {
                $score_1_tr += 2;
            }
            if(checkPhase([4],[8],[],$tr_planet))
            {
                $score_1_tr += 1;
            }
            if(checkPhase([3],[0],[],$tr_planet))
            {
                $score_1_tr += 1;
            }
            if(checkPhase([3],[1],[],$tr_planet))
            {
                $score_1_tr += 1;
            }
            if(checkPhase([3],[3],[],$tr_planet))
            {
                $score_1_tr += 1;
            }
            if(checkPhase([3],[4],[],$tr_planet))
            {
                $score_1_tr += 1;
            }
        }

        // 性冲动
        //	tr月亮5宫刑冲合火星+0.8,若此时金星或天王星刑冲合火星+0.8
        //	tp月亮5宫刑冲合火星+0.3，若此时金星或天王星刑冲合火星+0.3
        //	本命火星在5宫，tr月亮或天王星刑冲+0.5，合+0.8
        //	tr火星在5宫，月亮或金星或天王星刑冲+0.5，合+1
        //	tp火星在5宫，月亮或金星或天王星刑冲+0.2，合+0.5
        if(checkSignHouse([1],[5],$tr_planet) && checkPhase([1],[4],[0,90,180],$tr_planet))
        {
            $score_2_tr += 0.8;
            if(checkPhase([3],[4],[0,90,180],$tr_planet))
            {
                $score_2_tr += 0.8;
            }
            if(checkPhase([7],[4],[0,90,180],$tr_planet))
            {
                $score_2_tr += 0.8;
            }
        }
        if(checkSignHouse([1],[5],$tp_planet) && checkPhase([1],[4],[0,90,180],$tp_planet))
        {
            $score_2_tp += 0.3;
            if(checkPhase([3],[4],[0,90,180],$tp_planet))
            {
                $score_2_tp += 0.3;
            }
            if(checkPhase([7],[4],[0,90,180],$tp_planet))
            {
                $score_2_tp += 0.3;
            }
        }
        if(checkSignHouse([4],[5],$na_planet))
        {
            if(checkPhase([1],[4],[90,180],$tr_planet))
            {
                $score_2_tr += 0.5;
            }
            elseif(checkPhase([1],[4],[0],$tr_planet))
            {
                $score_2_tr += 0.8;
            }
            if(checkPhase([7],[4],[90,180],$tr_planet))
            {
                $score_2_tr += 0.5;
            }
            elseif(checkPhase([7],[4],[0],$tr_planet))
            {
                $score_2_tr += 0.8;
            }
        }
        if(checkSignHouse([4],[5],$tr_planet))
        {
            if(checkPhase([4],[1],[90,180],$tr_planet))
            {
                $score_2_tr += 0.5;
            }
            elseif(checkPhase([4],[1],[0],$tr_planet))
            {
                $score_2_tr += 1;
            }
            if(checkPhase([4],[3],[90,180],$tr_planet))
            {
                $score_2_tr += 0.5;
            }
            elseif(checkPhase([4],[3],[0],$tr_planet))
            {
                $score_2_tr += 1;
            }
            if(checkPhase([4],[7],[90,180],$tr_planet))
            {
                $score_2_tr += 0.5;
            }
            elseif(checkPhase([4],[7],[0],$tr_planet))
            {
                $score_2_tr += 1;
            }
        }
        if(checkSignHouse([4],[5],$tp_planet))
        {
            if(checkPhase([4],[1],[90,180],$tp_planet))
            {
                $score_2_tp += 0.2;
            }
            elseif(checkPhase([4],[1],[0],$tp_planet))
            {
                $score_2_tp += 0.5;
            }
            if(checkPhase([4],[3],[90,180],$tp_planet))
            {
                $score_2_tp += 0.2;
            }
            elseif(checkPhase([4],[3],[0],$tp_planet))
            {
                $score_2_tp += 0.5;
            }
            if(checkPhase([4],[7],[90,180],$tp_planet))
            {
                $score_2_tp += 0.2;
            }
            elseif(checkPhase([4],[7],[0],$tp_planet))
            {
                $score_2_tp += 0.5;
            }
        }

        // 贪玩过度
        //	tr月亮5宫刑冲合木星+1，若木星刑冲海王星+1
        //	tp月亮5宫刑冲合木星+0.5，若木星刑冲海王星+0.5
        //	本命木星在5宫，tr月亮刑冲+1，合+1.5
        //	本命木星在5宫，tp月亮刑冲+0.5，合+1
        if(checkSignHouse([1],[5],$tr_planet) && checkPhase([1],[5],[0,90,180],$tr_planet))
        {
            $score_3_tr += 1;
            if(checkPhase([5],[8],[90,180],$tr_planet))
            {
                $score_3_tr += 1;
            }
        }
        if(checkSignHouse([1],[5],$tp_planet) && checkPhase([1],[5],[0,90,180],$tp_planet))
        {
            $score_3_tr += 0.5;
            if(checkPhase([5],[8],[90,180],$tr_planet))
            {
                $score_3_tr += 0.5;
            }
        }
        if(checkSignHouse([5],[5],$na_planet))
        {
            if(checkPhase([1],[5],[90,180],$tr_planet))
            {
                $score_3_tr += 1;
            }
            elseif(checkPhase([1],[5],[0],$tr_planet))
            {
                $score_3_tr += 1.5;
            }
            if(checkPhase([1],[5],[90,180],$tp_planet))
            {
                $score_3_tr += 0.5;
            }
            elseif(checkPhase([1],[5],[0],$tp_planet))
            {
                $score_3_tr += 1;
            }
        }

        // 玩物丧志
        //	tr月亮5宫刑冲合海王星+1，若海王星刑冲土星+1
        //	tp月亮5宫刑冲合海王星+0.5，若海王星刑冲土星+0.5
        //	本命海王星在5宫，tr月亮刑冲+0.5，合+1，若海王星刑冲土星+1
        //	本命海王星在5宫，tr月亮刑冲+0.3，合+0.5，若海王星刑冲土星+0.5####重复的删除
        //	tr海王星在5宫+0.1，此时tr海王刑冲合日月+0.3
        if(checkSignHouse([1],[5],$tr_planet) && checkPhase([1],[8],[0,90,180],$tr_planet))
        {
            $score_4_tr += 1;
            if(checkPhase([1],[6],[90,180],$tr_planet))
            {
                $score_4_tr += 1;
            }
        }
        if(checkSignHouse([1],[5],$tp_planet) && checkPhase([1],[8],[0,90,180],$tp_planet))
        {
            $score_4_tp += 1;
            if(checkPhase([1],[6],[90,180],$tp_planet))
            {
                $score_4_tp += 1;
            }
        }
        if(checkSignHouse([8],[5],$na_planet))
        {
            if(checkPhase([1],[8],[90,180],$tr_planet))
            {
                $score_4_tr += 0.5;
                if(checkPhase([8],[6],[90,180],$tr_planet))
                {
                    $score_4_tr += 1;
                }
            }
            elseif(checkPhase([1],[8],[0],$tr_planet))
            {
                $score_4_tr += 1;
                if(checkPhase([8],[6],[90,180],$tr_planet))
                {
                    $score_4_tr += 1;
                }
            }
        }
        if(checkSignHouse([8],[5],$tr_planet))
        {
            $score_4_tr += 0.1;
            if(checkPhase([8],[0,1],[0,90,180],$tr_planet))
            {
                $score_4_tr += 0.3;
            }
        }

        $score_1 = $score_1_tr + $score_1_tp;
        if($score_1_tr && $score_1_tp) $score_1 += 2;
        $score_2 = $score_2_tr + $score_2_tp;
        if($score_2_tr && $score_2_tp) $score_2 += 2;
        $score_3 = $score_3_tr + $score_3_tp;
        if($score_3_tr && $score_3_tp) $score_3 += 2;
        $score_4 = $score_4_tr + $score_4_tp;
        if($score_4_tr && $score_4_tp) $score_4 += 2;

        if($score_1 > 0) $this->keywords[] = [
            'text' => '轻易动情',
            'per' => $score_1,
        ];
        if($score_2 > 0) $this->keywords[] = [
            'text' => '性冲动',
            'per' => $score_2,
        ];
        if($score_3 > 0) $this->keywords[] = [
            'text' => '贪玩过度',
            'per' => $score_3,
        ];
        if($score_4 > 0) $this->keywords[] = [
            'text' => '玩物丧志',
            'per' => $score_4,
        ];
    }
    protected function getKeywordsByHouse6()
    {
        $tr_planet = $this->transitsData[1]['planets'];// 行运外盘数据
        $tp_planet = $this->thirdprogressedData['planets'];// 三限数据
        $na_planet = $this->natalData['planets'];// 本命数据

        $score_1_tr = $score_1_tp = 0;
        $score_2_tr = $score_2_tp = 0;
        $score_3_tr = $score_3_tp = 0;
        // 打乱作息
        //	tr月亮刑冲合天王星或海王星或火星+1
        //	tp月亮刑冲合天王星或海王星或火星+0.5
        //	本命海王星或天王星或火星在6宫，tr月亮刑冲+0.5，合+1
        //	tr天王星或海王星或火星在6宫+0.3，此时tr天王星或海王星或火星刑冲合日月+0.5
        if(checkPhase([1],[4],[0,90,180],$tr_planet))
        {
            $score_1_tr += 1;
        }
        if(checkPhase([1],[7],[0,90,180],$tr_planet))
        {
            $score_1_tr += 1;
        }
        if(checkPhase([1],[8],[0,90,180],$tr_planet))
        {
            $score_1_tr += 1;
        }
        if(checkPhase([1],[4],[0,90,180],$tp_planet))
        {
            $score_1_tp += 0.5;
        }
        if(checkPhase([1],[7],[0,90,180],$tp_planet))
        {
            $score_1_tp += 0.5;
        }
        if(checkPhase([1],[8],[0,90,180],$tp_planet))
        {
            $score_1_tp += 0.5;
        }
        if(checkSignHouse([4],[6],$na_planet))
        {
            if(checkPhase([1],[4],[90,180],$tr_planet))
            {
                $score_1_tr += 0.5;
            }
            elseif(checkPhase([1],[4],[0],$tr_planet))
            {
                $score_1_tr += 1;
            }
        }
        if(checkSignHouse([7],[6],$na_planet))
        {
            if(checkPhase([1],[7],[90,180],$tr_planet))
            {
                $score_1_tr += 0.5;
            }
            elseif(checkPhase([1],[7],[0],$tr_planet))
            {
                $score_1_tr += 1;
            }
        }
        if(checkSignHouse([8],[6],$na_planet))
        {
            if(checkPhase([1],[8],[90,180],$tr_planet))
            {
                $score_1_tr += 0.5;
            }
            elseif(checkPhase([1],[8],[0],$tr_planet))
            {
                $score_1_tr += 1;
            }
        }
        if(checkSignHouse([4],[6],$tr_planet))
        {
            $score_1_tr += 0.3;
            if(checkPhase([4],[0,1],[0,90,180],$tr_planet))
            {
                $score_1_tr += 0.5;
            }
        }
        if(checkSignHouse([7],[6],$tr_planet))
        {
            $score_1_tr += 0.3;
            if(checkPhase([7],[0,1],[0,90,180],$tr_planet))
            {
                $score_1_tr += 0.5;
            }
        }
        if(checkSignHouse([8],[6],$tr_planet))
        {
            $score_1_tr += 0.3;
            if(checkPhase([8],[0,1],[0,90,180],$tr_planet))
            {
                $score_1_tr += 0.5;
            }
        }

        // 劳累
        //	tr月亮6宫刑冲合土星或火星+2，若土星或火星刑冲冥王星+1
        //	tp月亮6宫刑冲合土星或火星+1，若土星或火星刑冲冥王星+0.5
        //	本命土星（或火星）在6宫，tr月亮刑冲+0.5，合+1
        //	tr土星（或火星）在6宫+0.3，此时tr土星或火星刑冲合日月+0.5
        //	tp土星（或火星）在6宫+0.1，此时tr土星或火星刑冲合日月+0.3
        if(checkSignHouse([1],[6],$tr_planet))
        {
            if(checkPhase([1],[4],[0,90,180],$tr_planet))
            {
                $score_2_tr += 2;
                if(checkPhase([9],[4],[0,90,180],$tr_planet))
                {
                    $score_2_tr += 1;
                }
            }
            if(checkPhase([1],[6],[0,90,180],$tr_planet))
            {
                $score_2_tr += 2;
                if(checkPhase([9],[6],[0,90,180],$tr_planet))
                {
                    $score_2_tr += 1;
                }
            }
        }
        if(checkSignHouse([1],[6],$tp_planet))
        {
            if(checkPhase([1],[4],[0,90,180],$tp_planet))
            {
                $score_2_tp += 1;
                if(checkPhase([9],[4],[0,90,180],$tp_planet))
                {
                    $score_2_tp += 0.5;
                }
            }
            if(checkPhase([1],[6],[0,90,180],$tp_planet))
            {
                $score_2_tp += 1;
                if(checkPhase([9],[6],[0,90,180],$tp_planet))
                {
                    $score_2_tp += 0.5;
                }
            }
        }
        if(checkSignHouse([4],[6],$na_planet))
        {
            if(checkPhase([1],[4],[90,180],$tr_planet))
            {
                $score_2_tr += 0.5;
            }
            elseif(checkPhase([1],[4],[90,180],$tr_planet))
            {
                $score_2_tr += 1;
            }
        }
        if(checkSignHouse([6],[6],$na_planet))
        {
            if(checkPhase([1],[6],[90,180],$tr_planet))
            {
                $score_2_tr += 0.5;
            }
            elseif(checkPhase([1],[6],[90,180],$tr_planet))
            {
                $score_2_tr += 1;
            }
        }
        if(checkSignHouse([4],[6],$tr_planet))
        {
            $score_2_tr += 0.3;
            if(checkPhase([4],[0,1],[0,90,180],$tr_planet))
            {
                $score_2_tr += 0.5;
            }
        }
        if(checkSignHouse([6],[6],$tr_planet))
        {
            $score_2_tr += 0.3;
            if(checkPhase([6],[0,1],[0,90,180],$tr_planet))
            {
                $score_2_tr += 0.5;
            }
        }
        if(checkSignHouse([4],[6],$tp_planet))
        {
            $score_2_tp += 0.1;
            if(checkPhase([4],[0,1],[0,90,180],$tp_planet))
            {
                $score_2_tp += 0.3;
            }
        }
        if(checkSignHouse([6],[6],$tp_planet))
        {
            $score_2_tp += 0.1;
            if(checkPhase([6],[0,1],[0,90,180],$tp_planet))
            {
                $score_2_tp += 0.3;
            }
        }

        // 职场变动
        //	tr月亮6宫刑冲合天王星+0.2，若此时水星或太阳刑冲合海王星+1，且木星不能跟太阳、金星、太阳或月亮成相
        //  tr月亮6或10宫刑冲合海王星+1，若此时太阳或水星刑冲合海王星+1，且木星不能跟金星、太阳或月亮成相
        //	tp月亮6宫刑冲合天王星+0.1，若此时水星或太阳刑冲合海王星+0.5，且木星不能跟太阳、金星、太阳或月亮成相
        //	tp月亮6或10宫刑冲合海王星+0.5，若此时太阳或水星刑冲合海王星+0.5，且木星不能跟金星、太阳或月亮成相
        //	本命海王星在6宫或10宫，tr月亮或水星或太阳刑冲+0.2，合+0.5，且木星不能与金星、太阳、月亮成相
        if(checkSignHouse([1],[6],$tr_planet))
        {
            if(checkPhase([1],[7],[0,90,180],$tr_planet) && !checkPhase([5],[0,1,3],[],$tr_planet))
            {
                $score_3_tr += 0.2;
                if(checkPhase([2],[8],[0,90,180],$tr_planet))
                {
                    $score_3_tr += 1;
                }
                if(checkPhase([0],[8],[0,90,180],$tr_planet))
                {
                    $score_3_tr += 1;
                }
            }
            if(checkPhase([1],[8],[0,90,180],$tr_planet))
            {
                $score_3_tr += 1;
                if(checkPhase([0],[8],[0,90,180],$tr_planet) && !checkPhase([5],[0,1,3],[],$tr_planet))
                {
                    $score_3_tr += 1;
                }
                if(checkPhase([2],[8],[0,90,180],$tr_planet) && !checkPhase([5],[0,1,3],[],$tr_planet))
                {
                    $score_3_tr += 1;
                }
            }
        }
        elseif(checkSignHouse([1],[10],$tr_planet))
        {
            if(checkPhase([1],[8],[0,90,180],$tr_planet) && !checkPhase([5],[0,1,3],[],$tr_planet))
            {
                $score_3_tr += 1;
                if(checkPhase([0],[8],[0,90,180],$tr_planet))
                {
                    $score_3_tr += 1;
                }
                if(checkPhase([2],[8],[0,90,180],$tr_planet))
                {
                    $score_3_tr += 1;
                }
            }
        }
        if(checkSignHouse([1],[6],$tp_planet))
        {
            if(checkPhase([1],[7],[0,90,180],$tp_planet)  && !checkPhase([5],[0,1,3],[],$tp_planet))
            {
                $score_3_tp += 0.1;
                if(checkPhase([2],[8],[0,90,180],$tp_planet))
                {
                    $score_3_tp += 0.5;
                }
                if(checkPhase([0],[8],[0,90,180],$tp_planet))
                {
                    $score_3_tp += 0.5;
                }
            }
            if(checkPhase([1],[8],[0,90,180],$tp_planet) && !checkPhase([5],[0,1,3],[],$tp_planet))
            {
                $score_3_tp += 0.5;
                if(checkPhase([0],[8],[0,90,180],$tp_planet))
                {
                    $score_3_tp += 0.5;
                }
                if(checkPhase([2],[8],[0,90,180],$tp_planet))
                {
                    $score_3_tp += 0.5;
                }
            }
        }
        elseif(checkSignHouse([1],[10],$tp_planet))
        {
            if(checkPhase([1],[8],[0,90,180],$tp_planet)  && !checkPhase([5],[0,1,3],[],$tp_planet))
            {
                $score_3_tp += 0.5;
                if(checkPhase([0],[8],[0,90,180],$tp_planet))
                {
                    $score_3_tp += 0.5;
                }
                if(checkPhase([2],[8],[0,90,180],$tp_planet))
                {
                    $score_3_tp += 0.5;
                }
            }
        }
        if(checkSignHouse([8],[6],$na_planet))
        {
            if(!checkPhase([5],[0,1,3],[],$tr_planet))
            {
                if(checkPhase([0],[8],[90,180],$tr_planet))
                {
                    $score_3_tr += 0.2;
                }
                elseif(checkPhase([0],[8],[0],$tr_planet))
                {
                    $score_3_tr += 0.5;
                }
                if(checkPhase([1],[8],[90,180],$tr_planet))
                {
                    $score_3_tr += 0.2;
                }
                elseif(checkPhase([1],[8],[0],$tr_planet))
                {
                    $score_3_tr += 0.5;
                }
                if(checkPhase([2],[8],[90,180],$tr_planet))
                {
                    $score_3_tr += 0.2;
                }
                elseif(checkPhase([2],[8],[0],$tr_planet))
                {
                    $score_3_tr += 0.5;
                }
            }
        }
        elseif(checkSignHouse([8],[10],$na_planet))
        {
            if(!checkPhase([5],[0,1,3],[],$tr_planet))
            {
                if(checkPhase([0],[8],[90,180],$tr_planet))
                {
                    $score_3_tr += 0.2;
                }
                elseif(checkPhase([0],[8],[0],$tr_planet))
                {
                    $score_3_tr += 0.5;
                }
                if(checkPhase([1],[8],[90,180],$tr_planet))
                {
                    $score_3_tr += 0.2;
                }
                elseif(checkPhase([1],[8],[0],$tr_planet))
                {
                    $score_3_tr += 0.5;
                }
                if(checkPhase([2],[8],[90,180],$tr_planet))
                {
                    $score_3_tr += 0.2;
                }
                elseif(checkPhase([2],[8],[0],$tr_planet))
                {
                    $score_3_tr += 0.5;
                }
            }
        }


        $score_1 = $score_1_tr + $score_1_tp;
        if($score_1_tr && $score_1_tp) $score_1 += 2;
        $score_2 = $score_2_tr + $score_2_tp;
        if($score_2_tr && $score_2_tp) $score_2 += 2;
        $score_3 = $score_3_tr + $score_3_tp;
        if($score_3_tr && $score_3_tp) $score_3 += 2;

        if($score_1 > 0) $this->keywords[] = [
            'text' => '打乱作息',
            'per' => $score_1,
        ];
        if($score_2 > 0) $this->keywords[] = [
            'text' => '劳累',
            'per' => $score_2,
        ];
        if($score_3 > 0) $this->keywords[] = [
            'text' => '职场变动',
            'per' => $score_3,
        ];
    }
    protected function getKeywordsByHouse7()
    {
        $tr_planet = $this->transitsData[1]['planets'];// 行运外盘数据
        $tp_planet = $this->thirdprogressedData['planets'];// 三限数据
        $na_planet = $this->natalData['planets'];// 本命数据

        $score_1_tr = $score_1_tp = 0;
        $score_2_tr = $score_2_tp = 0;
        // 冲动发火
        //	tr月亮7宫刑冲天王星+2，此时tr月亮同时刑冲火星+2
        //	tr月亮7宫刑冲火星+2，此时火星刑冲合天王星+2
        //  tp月亮7宫刑冲天王星+0.8，此时tp月亮同时刑冲火星+0.8
        //	tp月亮7宫刑冲火星+1，此时tp火星刑冲合天王星+1
        //	本命火星或天王星在7宫，tr月亮刑冲+1，合+2
        //	tr火星或天王星在7宫+0.8
        //	tp火星或天王星在7宫+0.3
        if(checkSignHouse([1],[7],$tr_planet))
        {
            if(checkPhase([1],[7],[90,180],$tr_planet))
            {
                $score_1_tr += 2;
                if(checkPhase([1],[4],[90,180],$tr_planet))
                {
                    $score_1_tr += 2;
                }
            }
            if(checkPhase([1],[4],[90,180],$tr_planet))
            {
                $score_1_tr += 2;
                if(checkPhase([4],[7],[0,90,180],$tr_planet))
                {
                    $score_1_tr += 2;
                }
            }
        }
        if(checkSignHouse([1],[7],$tp_planet))
        {
            if(checkPhase([1],[7],[90,180],$tp_planet))
            {
                $score_1_tp += 0.8;
                if(checkPhase([1],[4],[90,180],$tp_planet))
                {
                    $score_1_tp += 0.8;
                }
            }
            if(checkPhase([1],[4],[90,180],$tp_planet))
            {
                $score_1_tp += 1;
                if(checkPhase([4],[7],[0,90,180],$tp_planet))
                {
                    $score_1_tp += 1;
                }
            }
        }
        if(checkSignHouse([4],[7],$na_planet))
        {
            $score_1_tr += 1;
            if(checkPhase([1],[4],[90,180],$tr_planet))
            {
                $score_1_tr += 1;
            }
            elseif(checkPhase([1],[4],[0],$tr_planet))
            {
                $score_1_tr += 2;
            }
        }
        if(checkSignHouse([7],[7],$na_planet))
        {
            $score_1_tr += 1;
            if(checkPhase([1],[7],[90,180],$tr_planet))
            {
                $score_1_tr += 1;
            }
            elseif(checkPhase([1],[7],[0],$tr_planet))
            {
                $score_1_tr += 2;
            }
        }
        if(checkSignHouse([4],[7],$tr_planet))
        {
            $score_1_tr += 0.8;
        }
        if(checkSignHouse([7],[7],$tr_planet))
        {
            $score_1_tr += 0.8;
        }
        if(checkSignHouse([4],[7],$tp_planet))
        {
            $score_1_tp += 0.3;
        }
        if(checkSignHouse([7],[7],$tr_planet))
        {
            $score_1_tp += 0.3;
        }

//        // 孤独自闭
//        //	tr月亮7宫合/拱/六分水星或金星或木星+1
//        //	tp月亮7宫合/拱/六分水星或金星或木星+0.5
//        //	tr金星或水星或木星在7宫+0.8
//        //	本命金星或水星或木星在7宫，tr月亮拱/六分+1，合+1.5
//        //	tp太阳合/拱/六分金星或木星、水星+0.5
//        //	tr金星合、拱、六分水星或木星+0.8
//        //	tp金星合、拱、六分水星或木星+0.5
//        //	tr月亮7宫/8宫/12宫刑冲合土星+2，此时土星刑冲合冥王星+2
//        //	tp月亮7宫/8宫/12宫刑冲合土星+1，此时土星刑冲合冥王星+1
//        //	tr土星或冥王星在7宫+0.5
//        //	tr月亮在8宫/12宫+1
//        //	tp月亮在8宫/12宫+0.8
//        //	tp太阳刑冲合土星或冥王星+0.5
//        //	本命太阳在8/12宫，tr月亮或土星刑冲+1，合+2
//        if(checkSignHouse([1],[7],$tr_planet))
//        {
//            if(checkPhase([1],[2],[0,60,120],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            if(checkPhase([1],[3],[0,60,120],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//            if(checkPhase([1],[5],[0,60,120],$tr_planet))
//            {
//                $score_1_tr += 1;
//            }
//        }
//        if(checkSignHouse([1],[7],$tp_planet))
//        {
//            if(checkPhase([1],[2],[0,60,120],$tp_planet))
//            {
//                $score_1_tp += 0.5;
//            }
//            if(checkPhase([1],[3],[0,60,120],$tp_planet))
//            {
//                $score_1_tp += 0.5;
//            }
//            if(checkPhase([1],[5],[0,60,120],$tp_planet))
//            {
//                $score_1_tp += 0.5;
//            }
//        }
//        if(checkSignHouse([2],[7],$tr_planet))
//        {
//            $score_2_tr += 0.8;
//        }
//        if(checkSignHouse([3],[7],$tr_planet))
//        {
//            $score_2_tr += 0.8;
//        }
//        if(checkSignHouse([5],[7],$tr_planet))
//        {
//            $score_2_tr += 0.8;
//        }
//        if(checkSignHouse([2],[7],$na_planet))
//        {
//            if(checkPhase([1],[2],[60,120],$tr_planet))
//            {
//                $score_2_tr += 1;
//            }
//            elseif(checkPhase([1],[2],[0],$tr_planet))
//            {
//                $score_2_tr += 1.5;
//            }
//        }
//        if(checkSignHouse([3],[7],$na_planet))
//        {
//            if(checkPhase([1],[3],[60,120],$tr_planet))
//            {
//                $score_2_tr += 1;
//            }
//            elseif(checkPhase([1],[3],[0],$tr_planet))
//            {
//                $score_2_tr += 1.5;
//            }
//        }
//        if(checkSignHouse([5],[7],$na_planet))
//        {
//            if(checkPhase([1],[5],[60,120],$tr_planet))
//            {
//                $score_2_tr += 1;
//            }
//            elseif(checkPhase([1],[5],[0],$tr_planet))
//            {
//                $score_2_tr += 1.5;
//            }
//        }
//        if(checkPhase([0],[2],[0,60,120],$tp_planet))
//        {
//            $score_2_tp += 0.5;
//        }
//        if(checkPhase([0],[3],[0,60,120],$tp_planet))
//        {
//            $score_2_tp += 0.5;
//        }
//        if(checkPhase([0],[5],[0,60,120],$tp_planet))
//        {
//            $score_2_tp += 0.5;
//        }
//        if(checkPhase([3],[2],[0,60,120],$tr_planet))
//        {
//            $score_2_tr += 0.8;
//        }
//        if(checkPhase([3],[5],[0,60,120],$tr_planet))
//        {
//            $score_2_tr += 0.8;
//        }
//        if(checkPhase([3],[2],[0,60,120],$tp_planet))
//        {
//            $score_2_tp += 0.5;
//        }
//        if(checkPhase([3],[5],[0,60,120],$tp_planet))
//        {
//            $score_2_tp += 0.5;
//        }
//        if(checkSignHouse([1],[7,8,12],$tr_planet) && checkPhase([1],[6],[0,90,180],$tr_planet))
//        {
//            $score_2_tr += 2;
//            if(checkPhase([6],[9],[0,90,180],$tr_planet))
//            {
//                $score_2_tr += 2;
//            }
//        }
//        if(checkSignHouse([1],[7,8,12],$tp_planet) && checkPhase([1],[6],[0,90,180],$tp_planet))
//        {
//            $score_2_tr += 1;
//            if(checkPhase([6],[9],[0,90,180],$tp_planet))
//            {
//                $score_2_tr += 1;
//            }
//        }
//        if(checkSignHouse([6],[7],$tr_planet))
//        {
//            $score_2_tr += 0.5;
//        }
//        if(checkSignHouse([9],[7],$tr_planet))
//        {
//            $score_2_tr += 0.5;
//        }
//        if(checkSignHouse([1],[8,12],$tr_planet))
//        {
//            $score_2_tr += 1;
//        }
//        if(checkSignHouse([1],[8,12],$tp_planet))
//        {
//            $score_2_tp += 0.8;
//        }
//        if(checkPhase([0],[6],[0,90,180],$tp_planet))
//        {
//            $score_2_tp += 0.5;
//        }
//        if(checkPhase([0],[9],[0,90,180],$tp_planet))
//        {
//            $score_2_tp += 0.5;
//        }
//        if(checkSignHouse([0],[8,12],$na_planet))
//        {
//            if(checkPhase([1],[0],[90,180],$tr_planet))
//            {
//                $score_2_tr += 1;
//            }
//            elseif(checkPhase([1],[0],[0],$tr_planet))
//            {
//                $score_2_tr += 2;
//            }
//            if(checkPhase([6],[0],[90,180],$tr_planet))
//            {
//                $score_2_tr += 1;
//            }
//            elseif(checkPhase([6],[0],[0],$tr_planet))
//            {
//                $score_2_tr += 2;
//            }
//        }

        //孤独自闭 20180903
        // tp月亮与金水木之一成非刑相，或tp金水与木星成非刑相，或tp月亮过3/5/9/11宫，无土冥成相
        //  tr月木成相+1
        //  tr月水成相+1
        //  tr月金成相+1
        //  tr日水成相+1
        //  tr日木成相+1
        //  tr金木成相+0.5
        if(checkPhase([1],[2,3,5],[0,60,120,180],$tp_planet) || checkPhase([3,2],[5],[0,60,120,180],$tp_planet)
            || (checkSignHouse([1],[3,5,9,11],$tp_planet) && !checkPhase([1],[6,9],[],$tp_planet))
        )
        {
            if(checkPhase([1],[5],[],$tr_planet))
            {
                $score_2_tr += 1;
            }
            if(checkPhase([1],[2],[],$tr_planet))
            {
                $score_2_tr += 1;
            }
            if(checkPhase([1],[3],[],$tr_planet))
            {
                $score_2_tr += 1;
            }
            if(checkPhase([0],[2],[],$tr_planet))
            {
                $score_2_tr += 1;
            }
            if(checkPhase([0],[5],[],$tr_planet))
            {
                $score_2_tr += 1;
            }
            if(checkPhase([3],[5],[],$tr_planet))
            {
                $score_2_tr += 0.5;
            }
        }

        $score_1 = $score_1_tr + $score_1_tp;
        if($score_1_tr && $score_1_tp) $score_1 += 2;
        $score_2 = $score_2_tr + $score_2_tp;
        if($score_2_tr && $score_2_tp) $score_2 += 2;

        if($score_1 > 0) $this->keywords[] = [
            'text' => '冲动发火',
            'per' => $score_1,
        ];
        if($score_2 > 0) $this->keywords[] = [
            'text' => '孤独自闭',
            'per' => $score_2,
        ];
    }
    protected function getKeywordsByHouse8()
    {
        $tr_planet = $this->transitsData[1]['planets'];// 行运外盘数据
        $tp_planet = $this->thirdprogressedData['planets'];// 三限数据
        $na_planet = $this->natalData['planets'];// 本命数据

        $score_1_tr = $score_1_tp = 0;
        // 挥霍无度
        //	tr月亮8宫刑冲木星或金星+2
        //	tp月亮8宫刑冲木星或金星+1
        //	本命木星或金星在8宫，tr月亮刑冲+0.3，合+0.5
        //	tp金星刑冲木星+0.1
        if(checkSignHouse([1],[8],$tr_planet))
        {
            if(checkPhase([1],[3],[90,180],$tr_planet))
            {
                $score_1_tr += 2;
            }
            if(checkPhase([1],[5],[90,180],$tr_planet))
            {
                $score_1_tr += 2;
            }
        }
        if(checkSignHouse([1],[8],$tp_planet))
        {
            if(checkPhase([1],[3],[90,180],$tp_planet))
            {
                $score_1_tp += 1;
            }
            if(checkPhase([1],[5],[90,180],$tp_planet))
            {
                $score_1_tp += 1;
            }
        }
        if(checkSignHouse([3],[8],$na_planet))
        {
            if(checkPhase([1],[3],[90,180],$tr_planet))
            {
                $score_1_tr += 0.3;
            }
            elseif(checkPhase([1],[3],[0],$tr_planet))
            {
                $score_1_tr += 0.3;
            }
        }
        if(checkSignHouse([5],[8],$na_planet))
        {
            if(checkPhase([1],[5],[90,180],$tr_planet))
            {
                $score_1_tr += 0.3;
            }
            elseif(checkPhase([1],[5],[0],$tr_planet))
            {
                $score_1_tr += 0.3;
            }
        }
        if(checkPhase([3],[5],[90,180],$tp_planet))
        {
            $score_1_tp += 0.1;
        }

        $score_1 = $score_1_tr + $score_1_tp;
        if($score_1_tr && $score_1_tp) $score_1 += 2;

        if($score_1 > 0) $this->keywords[] = [
            'text' => '挥霍无度',
            'per' => $score_1,
        ];
    }
    protected function getKeywordsByHouse9()
    {
        $tr_planet = $this->transitsData[1]['planets'];// 行运外盘数据
        $tp_planet = $this->thirdprogressedData['planets'];// 三限数据
        $na_planet = $this->natalData['planets'];// 本命数据

        $score_1_tr = $score_1_tp = 0;
        $score_2_tr = $score_2_tp = 0;
        // 狂妄自大
        //	tr月亮9宫刑冲木星+1
        //	tp月亮9宫刑冲木星+0.8
        //	tr水星刑冲木星+0.8
        //	tp水星刑冲木星+0.5
        //	本命木星在9宫，tr月亮或水星或太阳刑克+0.3，合+0.5
        if(checkSignHouse([1],[9],$tr_planet) && checkPhase([1],[5],[90,180],$tr_planet))
        {
            $score_1_tr += 1;
        }
        if(checkSignHouse([1],[9],$tp_planet) && checkPhase([1],[5],[90,180],$tp_planet))
        {
            $score_1_tp += 0.8;
        }
        if(checkPhase([2],[5],[90,180],$tr_planet))
        {
            $score_1_tr += 0.8;
        }
        if(checkPhase([2],[5],[90,180],$tp_planet))
        {
            $score_1_tp += 0.5;
        }
        if(checkSignHouse([5],[9],$na_planet))
        {
            if(checkPhase([0],[5],[90,180],$tr_planet))
            {
                $score_1_tr += 0.3;
            }
            elseif(checkPhase([0],[5],[0],$tr_planet))
            {
                $score_1_tr += 0.5;
            }
            if(checkPhase([1],[5],[90,180],$tr_planet))
            {
                $score_1_tr += 0.3;
            }
            elseif(checkPhase([1],[5],[0],$tr_planet))
            {
                $score_1_tr += 0.5;
            }
            if(checkPhase([2],[5],[90,180],$tr_planet))
            {
                $score_1_tr += 0.3;
            }
            elseif(checkPhase([2],[5],[0],$tr_planet))
            {
                $score_1_tr += 0.5;
            }
        }

        // 考试
        //	tr月亮9宫刑冲合海王+1，此时水星与土星或海王合刑冲+2
        //	tp月亮9宫刑冲合海王+0.6，此时水星与土星或海王合刑冲+0.4
        //	tp水星刑冲海王星或土星+0.3
        //	本命海王星或土星在9宫，tr月亮（或水星）刑冲+0.5，合+0.8
        if(checkSignHouse([1],[9],$tr_planet) && checkPhase([1],[8],[0,90,180],$tr_planet))
        {
            $score_2_tr += 1;
            if(checkPhase([2],[6],[0,90,180],$tr_planet))
            {
                $score_2_tr += 2;
            }
            if(checkPhase([2],[8],[0,90,180],$tr_planet))
            {
                $score_2_tr += 2;
            }
        }
        if(checkSignHouse([1],[9],$tp_planet) && checkPhase([1],[8],[0,90,180],$tp_planet))
        {
            $score_2_tp += 0.6;
            if(checkPhase([2],[6],[0,90,180],$tp_planet))
            {
                $score_2_tp += 0.4;
            }
            if(checkPhase([2],[8],[0,90,180],$tp_planet))
            {
                $score_2_tp += 0.4;
            }
        }
        if(checkPhase([2],[6],[90,180],$tp_planet))
        {
            $score_2_tp += 0.3;
        }
        if(checkPhase([2],[8],[90,180],$tp_planet))
        {
            $score_2_tp += 0.3;
        }
        if(checkSignHouse([6],[9],$na_planet))
        {
            if(checkPhase([1],[6],[90,180],$tr_planet))
            {
                $score_2_tr += 0.5;
            }
            elseif(checkPhase([1],[6],[0],$tr_planet))
            {
                $score_2_tr += 0.8;
            }
            if(checkPhase([2],[6],[90,180],$tr_planet))
            {
                $score_2_tr += 0.5;
            }
            elseif(checkPhase([2],[6],[0],$tr_planet))
            {
                $score_2_tr += 0.8;
            }
        }
        if(checkSignHouse([8],[9],$na_planet))
        {
            if(checkPhase([1],[8],[90,180],$tr_planet))
            {
                $score_2_tr += 0.5;
            }
            elseif(checkPhase([1],[8],[0],$tr_planet))
            {
                $score_2_tr += 0.8;
            }
            if(checkPhase([2],[8],[90,180],$tr_planet))
            {
                $score_2_tr += 0.5;
            }
            elseif(checkPhase([2],[8],[0],$tr_planet))
            {
                $score_2_tr += 0.8;
            }
        }

        $score_1 = $score_1_tr + $score_1_tp;
        if($score_1_tr && $score_1_tp) $score_1 += 2;
        $score_2 = $score_2_tr + $score_2_tp;
        if($score_2_tr && $score_2_tp) $score_2 += 2;

        if($score_1 > 0) $this->keywords[] = [
            'text' => '狂妄自大',
            'per' => $score_1,
        ];
        if($score_2 > 0) $this->keywords[] = [
            'text' => '考试大意',// 考试 20181228
            'per' => $score_2,
        ];
    }
    protected function getKeywordsByHouse10()
    {
        $tr_planet = $this->transitsData[1]['planets'];// 行运外盘数据
        $tp_planet = $this->thirdprogressedData['planets'];// 三限数据
        $na_planet = $this->natalData['planets'];// 本命数据

        $score_1_tr = $score_1_tp = 0;
        $score_2_tr = $score_2_tp = 0;
        $score_3_tr = $score_3_tp = 0;
        $score_4_tr = $score_4_tp = 0;
        // 好高骛远
        //	tr月亮10宫刑冲木星+2，此时水星刑冲木星+1
        //	tp月亮10宫刑冲木星+1，此时水星刑冲木星+0.5
        //	本命木星在10宫，tr月亮刑冲+0.5，合+1
        //	tp木星在10宫+0.1，刑冲月亮或太阳或水星+0.3
        if(checkSignHouse([1],[10],$tr_planet) && checkPhase([1],[5],[90,180],$tr_planet))
        {
            $score_1_tr += 2;
            if(checkPhase([2],[5],[90,180],$tr_planet))
            {
                $score_1_tr += 1;
            }
        }
        if(checkSignHouse([1],[10],$tp_planet) && checkPhase([1],[5],[90,180],$tp_planet))
        {
            $score_1_tp += 1;
            if(checkPhase([2],[5],[90,180],$tp_planet))
            {
                $score_1_tp += 0.5;
            }
        }
        if(checkSignHouse([5],[10],$na_planet))
        {
            if(checkPhase([1],[5],[90,180],$tr_planet))
            {
                $score_1_tr += 0.5;
            }
            elseif(checkPhase([1],[5],[0],$tr_planet))
            {
                $score_1_tr += 1;
            }
        }
        if(checkSignHouse([5],[10],$tp_planet))
        {
            $score_1_tp += 0.1;
            if(checkPhase([5],[0],[90,180],$tp_planet))
            {
                $score_1_tp += 0.3;
            }
            if(checkPhase([5],[1],[90,180],$tp_planet))
            {
                $score_1_tp += 0.3;
            }
            if(checkPhase([5],[2],[90,180],$tp_planet))
            {
                $score_1_tp += 0.3;
            }
        }

        // 感情用事
        //	tr月亮10宫刑冲海王星+2，此时金星刑冲海王星+2
        //	tp月亮10宫刑冲海王星+1，此时金星刑冲海王星+1
        //	本命海王星在10宫，tr月亮刑冲+0.5，合+1
        //	tp海王星在10宫，刑冲太阳或月亮+0.5
        if(checkSignHouse([1],[10],$tr_planet) && checkPhase([1],[8],[90,180],$tr_planet))
        {
            $score_2_tr += 2;
            if(checkPhase([3],[8],[90,180],$tr_planet))
            {
                $score_2_tr += 2;
            }
        }
        if(checkSignHouse([1],[10],$tp_planet) && checkPhase([1],[8],[90,180],$tp_planet))
        {
            $score_2_tp += 1;
            if(checkPhase([3],[8],[90,180],$tp_planet))
            {
                $score_2_tp += 0.5;
            }
        }
        if(checkSignHouse([8],[10],$na_planet))
        {
            if(checkPhase([1],[8],[90,180],$tr_planet))
            {
                $score_2_tr += 0.5;
            }
            elseif(checkPhase([1],[8],[0],$tr_planet))
            {
                $score_2_tr += 1;
            }
        }
        if(checkSignHouse([8],[10],$tp_planet))
        {
            if(checkPhase([8],[0],[90,180],$tp_planet))
            {
                $score_2_tp += 0.5;
            }
            if(checkPhase([8],[1],[90,180],$tp_planet))
            {
                $score_2_tp += 0.5;
            }
        }

        // 不思进取
        //	tr月亮10宫刑冲土星+2，此时土星刑冲太阳或水星+1
        //	tp月亮10宫刑冲土星+1，此时土星刑冲太阳或水星+0.5
        //	本命土星在10宫，tr月亮或太阳或水星刑冲+0.5，合+1
        //	tp土星在10宫，刑冲月亮或太阳或水星+0.3
        //	tp太阳或月亮或水星刑冲土星+0.1
        if(checkSignHouse([1],[10],$tr_planet) && checkPhase([1],[6],[90,180],$tr_planet))
        {
            $score_3_tr += 2;
            if(checkPhase([6],[0],[90,180],$tr_planet))
            {
                $score_3_tr += 1;
            }
            if(checkPhase([6],[2],[90,180],$tr_planet))
            {
                $score_3_tr += 1;
            }
        }
        if(checkSignHouse([1],[10],$tp_planet) && checkPhase([1],[6],[90,180],$tp_planet))
        {
            $score_3_tp += 1;
            if(checkPhase([6],[0],[90,180],$tp_planet))
            {
                $score_3_tp += 0.5;
            }
            if(checkPhase([6],[2],[90,180],$tp_planet))
            {
                $score_3_tp += 0.5;
            }
        }
        if(checkSignHouse([6],[10],$na_planet))
        {
            if(checkPhase([0],[6],[90,180],$tr_planet))
            {
                $score_3_tr += 0.5;
            }
            elseif(checkPhase([0],[6],[90,180],$tr_planet))
            {
                $score_3_tr += 1;
            }
            if(checkPhase([1],[6],[90,180],$tr_planet))
            {
                $score_3_tr += 0.5;
            }
            elseif(checkPhase([1],[6],[90,180],$tr_planet))
            {
                $score_3_tr += 1;
            }
            if(checkPhase([2],[6],[90,180],$tr_planet))
            {
                $score_3_tr += 0.5;
            }
            elseif(checkPhase([2],[6],[90,180],$tr_planet))
            {
                $score_3_tr += 1;
            }
        }
        if(checkSignHouse([6],[10],$tp_planet))
        {
            if(checkPhase([6],[0],[90,180],$tp_planet))
            {
                $score_3_tp += 0.3;
            }
            if(checkPhase([6],[1],[90,180],$tp_planet))
            {
                $score_3_tp += 0.3;
            }
            if(checkPhase([6],[2],[90,180],$tp_planet))
            {
                $score_3_tp += 0.3;
            }
        }
        if(checkPhase([0],[6],[90,180],$tp_planet))
        {
            $score_3_tp += 0.1;
        }
        if(checkPhase([1],[6],[90,180],$tp_planet))
        {
            $score_3_tp += 0.1;
        }
        if(checkPhase([2],[6],[90,180],$tp_planet))
        {
            $score_3_tp += 0.1;
        }

        // 缺乏计划
        //	tr月亮10宫刑冲火星+2，此时火星刑冲海王星+2
        //	tp月亮10宫刑冲火星+1，此时火星刑冲海王星+1
        //	本命火星或海王星在10宫，tr月亮刑冲+0.5，合+1
        //	tp火星或海王星在10宫，太阳或月亮或水星刑冲+0.8
        if(checkSignHouse([1],[10],$tr_planet) && checkPhase([1],[4],[90,180],$tr_planet))
        {
            $score_4_tr += 2;
            if(checkPhase([4],[8],[90,180],$tr_planet))
            {
                $score_4_tr += 2;
            }
        }
        if(checkSignHouse([1],[10],$tp_planet) && checkPhase([1],[4],[90,180],$tp_planet))
        {
            $score_4_tp += 1;
            if(checkPhase([4],[8],[90,180],$tp_planet))
            {
                $score_4_tp += 1;
            }
        }
        if(checkSignHouse([4],[10],$na_planet))
        {
            if(checkPhase([1],[4],[90,180],$tr_planet))
            {
                $score_4_tr += 0.5;
            }
            elseif(checkPhase([1],[4],[90,180],$tr_planet))
            {
                $score_4_tr += 1;
            }
        }
        if(checkSignHouse([8],[10],$na_planet))
        {
            if(checkPhase([1],[8],[90,180],$tr_planet))
            {
                $score_4_tr += 0.5;
            }
            elseif(checkPhase([1],[8],[90,180],$tr_planet))
            {
                $score_4_tr += 1;
            }
        }
        if(checkSignHouse([4],[10],$tp_planet))
        {
            if(checkPhase([4],[0],[90,180],$tp_planet))
            {
                $score_4_tp += 0.8;
            }
            if(checkPhase([4],[1],[90,180],$tp_planet))
            {
                $score_4_tp += 0.8;
            }
            if(checkPhase([4],[2],[90,180],$tp_planet))
            {
                $score_4_tp += 0.8;
            }
        }
        if(checkSignHouse([8],[10],$tp_planet))
        {
            if(checkPhase([8],[0],[90,180],$tp_planet))
            {
                $score_4_tp += 0.8;
            }
            if(checkPhase([8],[1],[90,180],$tp_planet))
            {
                $score_4_tp += 0.8;
            }
            if(checkPhase([8],[2],[90,180],$tp_planet))
            {
                $score_4_tp += 0.8;
            }
        }


        $score_1 = $score_1_tr + $score_1_tp;
        if($score_1_tr && $score_1_tp) $score_1 += 2;
        $score_2 = $score_2_tr + $score_2_tp;
        if($score_2_tr && $score_2_tp) $score_2 += 2;
        $score_3 = $score_3_tr + $score_3_tp;
        if($score_3_tr && $score_3_tp) $score_3 += 2;
        $score_4 = $score_4_tr + $score_4_tp;
        if($score_4_tr && $score_4_tp) $score_4 += 2;

        if($score_1 > 0) $this->keywords[] = [
            'text' => '好高骛远',
            'per' => $score_1,
        ];
        if($score_2 > 0) $this->keywords[] = [
            'text' => '感情用事',
            'per' => $score_2,
        ];
        if($score_3 > 0) $this->keywords[] = [
            'text' => '不思进取',
            'per' => $score_3,
        ];
        if($score_4 > 0) $this->keywords[] = [
            'text' => '缺乏计划',
            'per' => $score_4,
        ];
    }
    protected function getKeywordsByHouse11()
    {
        $tr_planet = $this->transitsData[1]['planets'];// 行运外盘数据
        $tp_planet = $this->thirdprogressedData['planets'];// 三限数据

        $score_1_tr = $score_1_tp = 0;
        $score_2_tr = $score_2_tp = 0;
        $score_3_tr = $score_3_tp = 0;
        // 妥协
        //	tp月亮刑冲合海王+1，
        if(checkPhase([1],[8],[0,90,180],$tp_planet))
        {
            $score_1_tp += 1;
        }

        // 聚会
        //	tp月亮过11宫刑冲金星土星水星或火星+1，若此时金星刑冲土星+1
        //	tr金星刑冲土星+1
        //	tr月亮过11宫刑冲火土冥+2
        //	tr火星11宫+0.3
        //  当宜出现   时，分数减5
        if(checkSignHouse([1],[11],$tp_planet))
        {
            if(checkPhase([1],[2],[90,180],$tp_planet))
            {
                $score_2_tp += 1;
                if(checkPhase([3],[6],[90,180],$tp_planet))
                {
                    $score_2_tp += 1;
                }
            }
            if(checkPhase([1],[3],[90,180],$tp_planet))
            {
                $score_2_tp += 1;
                if(checkPhase([3],[6],[90,180],$tp_planet))
                {
                    $score_2_tp += 1;
                }
            }
            if(checkPhase([1],[4],[90,180],$tp_planet))
            {
                $score_2_tp += 1;
                if(checkPhase([3],[6],[90,180],$tp_planet))
                {
                    $score_2_tp += 1;
                }
            }
            if(checkPhase([1],[6],[90,180],$tp_planet))
            {
                $score_2_tp += 1;
                if(checkPhase([3],[6],[90,180],$tp_planet))
                {
                    $score_2_tp += 1;
                }
            }
        }
        if(checkPhase([3],[6],[90,180],$tr_planet))
        {
            $score_2_tr += 1;
        }
        if(checkSignHouse([1],[11],$tr_planet) && checkPhase([1],[4,6,9],[90,180],$tr_planet))
        {
            $score_2_tr += 2;
        }
        if(checkSignHouse([4],[11],$tr_planet))
        {
            $score_2_tr += 0.3;
        }

        // 玻璃心
        //	tp月亮刑冲合海王星+1，若此时水星刑冲合海王星+1
        //	tr月亮刑冲合海王星+2
        //	tr海王星刑冲合日月水+1
        //玻璃心 修改版
        //	tp月亮刑冲合海王星+1，若此时水星刑冲合海王星+1
        //		tr水星刑冲日月水+1.5
        //	tr月亮刑冲合海王星+2
        //	tr海王星刑冲合日月水+0.1
        //		tr水星刑冲日月水+1.5
        if(checkPhase([1],[8],[0,90,180],$tp_planet))
        {
            $score_3_tp += 1;
            if(checkPhase([2],[8],[0,90,180],$tp_planet))
            {
                $score_3_tp += 1;
                if(checkPhase([2],[0,1,2],[0,90,180],$tr_planet))
                {
                    $score_3_tr += 1.5;
                }
            }
        }
        if(checkPhase([1],[8],[0,90,180],$tr_planet))
        {
            $score_3_tr += 2;
        }
        if(checkPhase([8],[0,1,2],[0,90,180],$tr_planet))
        {
            $score_3_tr += 0.1;
            if(checkPhase([2],[0,1,2],[0,90,180],$tr_planet))
            {
                $score_3_tr += 1.5;
            }
        }

        $score_1 = $score_1_tr + $score_1_tp;
        if($score_1_tr && $score_1_tp) $score_1 += 2;
        $score_2 = $score_2_tr + $score_2_tp;
        if($score_2_tr && $score_2_tp) $score_2 += 2;
        $score_3 = $score_3_tr + $score_3_tp;
        if($score_3_tr && $score_3_tp) $score_3 += 2;

        if($score_1 > 0) $this->keywords[] = [
            'text' => '妥协',
            'per' => $score_1,
        ];
        if($score_2 > 0) $this->keywords[] = [
            'text' => '聚会',
            'per' => $score_2,
        ];
        if($score_3 > 0) $this->keywords[] = [
            'text' => '玻璃心',
            'per' => $score_3,
        ];
    }
    protected function getKeywordsByHouse12()
    {
        $tr_planet = $this->transitsData[1]['planets'];// 行运外盘数据
        $tp_planet = $this->thirdprogressedData['planets'];// 三限数据

        $score_1_tr = $score_1_tp = 0;
        $score_2_tr = $score_2_tp = 0;
        // 患得患失
        //	tp月亮过8/12宫刑冲合天海冥+1，若此时水星刑冲合天海冥+1
        //	tr月亮过8/12宫刑冲合天海冥+2
        //	tr冥王星与日月水金成相+1
//        if(checkSignHouse([1],[8,12],$tp_planet) && checkPhase([1],[7,8,9],[0,90,180],$tp_planet))
//        {
//            $score_1_tp += 1;
//            if(checkPhase([2],[7,8,9],[0,90,180],$tp_planet))
//            {
//                $score_1_tp += 1;
//            }
//        }
//        if(checkSignHouse([1],[8,12],$tr_planet) && checkPhase([1],[7,8,9],[0,90,180],$tr_planet))
//        {
//            $score_1_tr += 2;
//        }
//        if(checkPhase([9],[0,1,2,3],[],$tr_planet))
//        {
//            $score_1_tr += 1;
//        }
        //患得患失
        // tp月亮与冥王刑冲合，或tp水星与冥王刑冲合
        //  tr月冥成相+2
        //  tr水冥成相+2
        //  tr日冥+1
        //  tr金冥+1
        if(checkPhase([1],[9],[0,90,180],$tp_planet) || checkPhase([2],[9],[0,90,180],$tp_planet))
        {
            $score_1_tp+=0.5;

            if(checkPhase([1],[9],[],$tr_planet))
            {
                $score_1_tr += 2;
            }
            if(checkPhase([2],[9],[],$tr_planet))
            {
                $score_1_tr += 2;
            }
            if(checkPhase([0],[9],[],$tr_planet))
            {
                $score_1_tr += 1;
            }
            if(checkPhase([3],[9],[],$tr_planet))
            {
                $score_1_tr += 1;
            }
        }


        // 猜忌
        //	tp月亮过8/12宫刑冲合冥王+1，若此时水星刑冲合冥王星+1
        //	tr月亮过8/12宫刑冲合冥王星+2
        //	tr冥王星刑冲合日月水金+1
        //猜忌 修改版
        //	tp月亮过8/12宫刑冲合冥王+1，若此时水星刑冲合冥王星+1
        //		tr日水合刑冲冥王+1（叠加）
        //	tr月亮过8/12宫刑冲合冥王星+2
        //	tr冥王星刑冲合日月水金+0.1
        //		tr日水合刑冲冥王+1（叠加）
        if(checkSignHouse([1],[8,12],$tp_planet) && checkPhase([1],[9],[0,90,180],$tp_planet))
        {
            $score_2_tp += 1;
            if(checkPhase([2],[9],[0,90,180],$tp_planet))
            {
                $score_2_tp += 1;
                if(checkPhase([0],[9],[0,90,180],$tr_planet))
                {
                    $score_2_tr += 1;
                }
                if(checkPhase([2],[9],[0,90,180],$tr_planet))
                {
                    $score_2_tr += 1;
                }
            }
        }
        if(checkSignHouse([1],[8,12],$tr_planet) && checkPhase([1],[9],[0,90,180],$tr_planet))
        {
            $score_2_tr += 2;
        }
        if(checkPhase([9],[0,1,2,3],[0,90,180],$tr_planet))
        {
            $score_2_tr += 0.1;
            if(checkPhase([0],[9],[0,90,180],$tr_planet))
            {
                $score_2_tr += 1;
            }
            if(checkPhase([2],[9],[0,90,180],$tr_planet))
            {
                $score_2_tr += 1;
            }
        }

        $score_1 = $score_1_tr + $score_1_tp;
        if($score_1_tr && $score_1_tp) $score_1 += 2;
        $score_2 = $score_2_tr + $score_2_tp;
        if($score_2_tr && $score_2_tp) $score_2 += 2;

        if($score_1 > 0) $this->keywords[] = [
            'text' => '患得患失',
            'per' => $score_1,
        ];
        if($score_2 > 0) $this->keywords[] = [
            'text' => '猜忌',
            'per' => $score_2,
        ];
    }
}
